package com.linciping.gradle.inject

import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.LinearLayout
import androidx.fragment.app.Fragment

class SampleFragment : Fragment() {

    private lateinit var btnClick: Button
    private lateinit var llContent: LinearLayout

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val contentView = inflater.inflate(R.layout.fragment_sample, container, false)
        btnClick = contentView.findViewById(R.id.btn_click)
        btnClick.setOnClickListener {
            Log.d("SampleFragment", "sample fragment click")
        }
        llContent = contentView.findViewById(R.id.ll_content)
        llContent.getChildAt(0).setOnClickListener {
            Log.d("SampleFragment", "no id view click")
        }
        return contentView
    }
}